package com.sys.user.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sys.user.entity.SysUser;
import com.sys.user.mapper.SysUserMapper;
import com.sys.user.service.SysUserService;
import com.sys.user.view.SysUserView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author djianfeng
 * @since 2018-07-24
 */
@Transactional
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {

    @Autowired
    SysUserMapper userMapper;

    @Override
    public List<SysUserView> getSysUserViews(Page<SysUserView> page, SysUserView view) {
        page.setRecords(userMapper.getSysUserViews(page,view));
        return page.getRecords();
    }
}
